package com.auleev.string;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.LinkedList;
import java.util.List;





public class GestionMois {
  
  
  private List<Integer> monthList;
  
  public static void main(String args[]){
    
    System.out.println("toot");
    Integer toto = new Integer(12);
    List<Integer> monTest =  getNextKey(toto);
    
    for (int i = 0;i < 4;i++){
      System.out.println(""+monTest.get(i).toString());
    }
    System.out.println("fin");
  }
  
  
  private static List<Integer> getNextKey(Integer inCodeMonthId) {
    
    List<Integer> toto = new LinkedList<Integer>();
    for(int i = inCodeMonthId;i<12;i++){
      toto.add(Integer.valueOf(i));
    }
    return toto;
  }
  
  private void regenerateWeekList() {

    if (monthList == null) {
      monthList = new ArrayList<Integer>();
      //monthList.add(new SelectItem(null, "----------"));

      Calendar cal = new GregorianCalendar();

      try {
        List<Date> dateRange = null;

        if (dateRange.size() == 2) {

          Date start = dateRange.get(0);
          Date end = dateRange.get(1);

          cal.setTime(end);

          while (cal.getTime().compareTo(start) >= 0) {
         //   String label = labelFormatter.format(cal.getTime());
           // SelectItem item = new SelectItem(cal.getTime(), label);
     //       monthList.add(item);
            cal.add(Calendar.MONTH, -1);
          }
        }
      } catch (Exception e) {
        // TODO Manage the exception
        
      }
    }
  }

}
